package com.rainng.coursesystem.dao.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.rainng.coursesystem.model.entity.*;
import com.rainng.coursesystem.model.shitong.CheckFileVo;
import com.rainng.coursesystem.model.taskplan.PlanStateUpdateVo;
import com.rainng.coursesystem.model.taskplan.PlanUpdateVo;
import com.rainng.coursesystem.model.taskplan.PlanVo;
import com.rainng.coursesystem.model.taskplan.PlanProjectVo;
import com.rainng.coursesystem.model.taskplan.DeliveryVo;
import com.rainng.coursesystem.model.taskplan.ReturnVo;


import com.rainng.coursesystem.model.taskplan.CarVo;
import com.rainng.coursesystem.module.task.dto.request.TaskCarDTO;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface PlanMapper {



    int savePlan(@Param("po")PlanVo vo,Long createtimelong);

    IPage<Object> queryPlan(@Param("po") PlanVo po, Page<Object> pageParam);

    int countPlan(@Param("po") PlanVo po);

    int updatePlan(@Param("po") PlanUpdateVo po);

    int updatePlanState(@Param("po") PlanStateUpdateVo po);


    int deletePlanById(String id);

    List<Map<String,Object>> getPlanDetailById(String id);


    List<Map<String,Object>> selectInfoByTaskCode(String taskCode);
    TrialProjectNumEntity getTrialProject(String applyNum);
    List<TireInfoEntity> getTireList(String vin);
    IPage<TakePhotoItemsEntity> getPhotoItems(Page toPage, @Param("query") TakePhotoItemsEntity params);
    void saveTakePhotosItems(@Param("po") TakePhotoItemsEntity po );
    void deleteTakePhotosItems(@Param("po") TakePhotoItemsEntity po);
    void updateTakePhotosItems(@Param("po") TakePhotoItemsEntity po);
    List<TrialProjectsEntity> getTrialProjectsByUserId(String userId, String vin);
    List<TakePhotoItemsEntity> getTrialPhotosItems(String prjNum);
    List<TakePhotoItemsEntity> getNormalTrialPhotosItems(String prjNum);
    void saveTrialProjects(@Param("po") PlanProjectVo po);
    void updateProjects(@Param("po") PlanProjectVo po);
    void updateCar(@Param("po") CarVo po);
    void saveCar(@Param("po") CarVo po);
    void deleteProjectsById(String applyNum);
    void deleteCarByVin(String vin);
    List<Map<String,Object>> getDeliveryLocation();
    void saveDeliveryRecord(@Param("po") DeliveryVo po, Long createtimelong);
    List<DeliveryVo> queryDeliveryRecord(String planId);
    int updateDeliveryRecord(@Param("po") DeliveryVo po);
    void updatePlanFlowStatus(String flowStatus, String planId);
    void saveReturnRecord(@Param("po") ReturnVo po, Long createtimelong);
    List<ReturnVo> queryReturnRecord(String planId);
    void updateDelivery(@Param("po") DeliveryVo po);
    void deleteDelivery(Integer id);
    void updateReturnRecord(@Param("po") ReturnVo po);
    void deleteReturn(Integer id);
    void updateCarByVin(@Param("po") TaskCarDTO po);
    TaskCarDTO getCarConfig(String vin);
    void cleanFlowRecord(Integer planId);
    void cleanReturnRecord(Integer planId);
    void resetPlanState(Integer planId);
}
